package game;

import org.lwjgl.input.Keyboard;

public class Player extends Entity {

	private boolean isControlable = false;

	public Player(float x, float y, boolean control) {
		super(x, y);
		isControlable = control;
	}

	public void update(int delta) {
		float xa = 0.0f, ya = 0.0f;
		if (isControlable) {
			if (Keyboard.isKeyDown(Keyboard.KEY_W)) {
				ya -= speed * delta;
			}
			if (Keyboard.isKeyDown(Keyboard.KEY_S)) {
				ya += speed * delta;
			}
			if (Keyboard.isKeyDown(Keyboard.KEY_A)) {
				xa -= speed * delta;
			}
			if (Keyboard.isKeyDown(Keyboard.KEY_D)) {
				xa += speed * delta;
			}
			
			move(xa, ya);
		}
	}

	public void render() {

	}
}
